﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ANN.Math {
    public class Sigmoid : IActivationFunction {
        public float Output(float input) {
            return (float)(1.0 / (1 + System.Math.Exp(-1.0 * input)));
        }

        public float Differential(float input) {
            return (float)(input * (1.0 - input));
        }

        public float DifferentialFunction(float input) {
            return Differential(Output(input));
        }
    }
}
